// UVa1149 Bin Packing
// 陈锋
#include <algorithm>
#include <iostream>
using namespace std;
#define _for(i, a, b) for (int i = (a); i < (int)(b); ++i)
const int MAXN = 1e5 + 8;
int n, l, len[MAXN];
int solve() {
  cin >> n >> l;
  _for(i, 0, n) cin >> len[i];
  sort(len, len + n, greater<int>());
  int ans = 0, left = 0, right = n - 1;
  while (left <= right) {
    ans++, left++;
    if (left != right && len[left] + len[right] <= l) right--;
  }
  return ans;
}

int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  int T;
  cin >> T;
  _for(t, 0, T) {
    if (t) cout << endl;
    cout << solve() << endl;
  }
  return 0;
}
/*
算法分析请参考: 《入门经典-习题与解答》习题8-1
注意本题使用的双指针扫描法
*/
// 25889435  1149  Bin Packing  Accepted  C++  0.010  2020-12-26 11:39:58